package com.JinYuan.service.impl;

import com.JinYuan.dao.UserDao;
import com.JinYuan.pojo.User;
import com.JinYuan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 金园
 * @create 2022/5/11
 * @Description
 * @className UserServiceImpl
 * @packageName com.JinYuan.service.impl
 */
@Service
public class UserServiceImpl implements UserService {

    UserDao userDao;
    @Autowired
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public List<User> findAll() {
        List<User> users = userDao.findAll();
        return users;
    }

    @Override
    public List<User> Page(Integer pageNum, Integer pageSize) {

        return userDao.Page(pageNum,pageSize);
    }
}
